package net.cooltain.warhammer.running.window.popupItem;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JMenuItem;

import net.cooltain.warhammer.running.entity.MotionCard;

public class CardPopupItem extends JMenuItem {
	
	private static final long serialVersionUID = -2596810963228528789L;
	
	protected MotionCard motionCard ;
	
	public CardPopupItem(String itemName ,MotionCard motionCard){
		super(itemName);
		this.motionCard = motionCard;
		init();
	}
	
	void init(){
		this.addActionListener(new ActionListener(){
			public void actionPerformed(ActionEvent e) {
				menuItem_actionPerformed(e);
			}
		});
	}
	
	/**
	 * 点击事件
	 * @param e
	 */
	protected void menuItem_actionPerformed(ActionEvent e) {
		System.out.println(this.motionCard.cardEntity.getName()+" : "+this.getText()+ " 菜单被点击,什么也没发生");
	}
}
